package com.fxl.majiang.message.output;

import com.fxl.majiang.enums.CardTypeEnum;
import com.fxl.majiang.enums.TilesEnum;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fengxinglei
 * @date 2022/8/8 21:25
 * @description 给玩家推送起手牌
 */
@Data
public class OutputStartTilesMsgData implements OutputMessageData {

    private static final long serialVersionUID = 506673996147127410L;
    /**
     * 手牌
     */
    private List<TilesEnum> ownedTiles;

    /**
     * 百搭牌
     */
    private List<TilesEnum> versatileTiles = new ArrayList<>(2);

    /**
     * 起手补花的人
     */
    private String firstSupplementUserId;

    /**
     * 庄家userId
     */
    private String bankerUserId;

    /**
     * 其他玩家起手牌数量
     */
    List<StartTilesCount> otherCountList = new ArrayList<>();

    /**
     * 可以暗杠的牌
     */
    private List<TilesEnum> anGangTiles;

    /**
     * 是否可以自摸
     */
    private boolean canZiMo;

    public void addOtherCount(String userId, Integer count) {
        otherCountList.add(new StartTilesCount(userId,count));
    }

    @Data
    @AllArgsConstructor
    private static class StartTilesCount {
        private String userId;

        private Integer count;
    }
}
